﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
  Id="MoutasemA.ManageMappedPagesCustomAction"
  Location="CommandUI.Ribbon" Sequence="35">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition
          Location="Ribbon.WebApp.Manage.Controls._children">
          <Button
            Id="MoutasemA.ManageMappedPagesCustomAction.ManageMappedPages"
            Command="ManageMappedPages_Command"
            Sequence="35"
            Image16by16Left="0"
            Image16by16Top="-192"
            Image16by16="/_layouts/1033/images/formatmap16x16.png"
            Description="Manage Mapped Pages to Custom pages"
            LabelText="Manage Mapped Pages"
            TemplateAlias="o2"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="ManageMappedPages_Command"
          EnabledScript="javascript:(function () {return SP.UI.Admin.WebApplicationPageComponent.get_selectedItem() != null;})();"
          CommandAction="javascript:
          SP.UI.ModalDialog.ShowPopupDialog('/_layouts/MoutasemA.ManageMappedPages/ManageMappedPages.aspx?webApplicationId=' + SP.UI.Admin.WebApplicationPageComponent.get_selectedItem().id );"
          >
        </CommandUIHandler>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
</Elements>
